var e = getApp();

Page({
    data: {
        allData: {}
    },
    onLoad: function(e) {
        this.getData();
    },
    getData: function() {
        var t = this, a = e.getNetAddresss("plugin.stock-service.frontend.controllers.home.index");
        e._getNetWork({
            url: a,
            success: function(e) {
                var a = e.data, n = a.data, r = a.msg;
                a.result ? (t.setData({
                    allData: n
                }), wx.setNavigationBarTitle({
                    title: n.name
                })) : wx.showToast({
                    title: r
                });
            }
        });
    },
    goStockAggregatePage: function() {
        wx.navigateTo({
            url: "/packageF/stockService/stockAggregatePage/index"
        });
    },
    goMyInventoryPage: function(e) {
        wx.navigateTo({
            url: "/packageF/stockService/myInventory/index?name=" + e.currentTarget.dataset.name
        });
    },
    goInventoryDetailsPage: function(e) {
        wx.navigateTo({
            url: "/packageF/stockService/inventoryDetails/index?name=" + e.currentTarget.dataset.name
        });
    },
    goRevenueDetailsPage: function() {
        wx.navigateTo({
            url: "/packageF/stockService/revenueDetails/index"
        });
    },
    goFinancialStatementspage: function() {
        wx.navigateTo({
            url: "/packageF/stockService/financialStatements/index"
        });
    },
    inventoryOrder: function() {
        wx.navigateTo({
            url: "/packageA/member/myOrder_v2/myOrder_v2?status=0&orderType=stockServiceInventory"
        });
    },
    pickUpOrders: function() {
        wx.navigateTo({
            url: "/packageA/member/myOrder_v2/myOrder_v2?status=0&orderType=stockServicePickUp"
        });
    }
});